<?php
error_reporting(0);
require_once("includes/pagetop.php");

if(!isset($_SESSION['Allyfolio_User_ID']) || $_SESSION['Allyfolio_User_ID']==0)
{
    redirect("index.php");
}

$patharr=explode("/",$_SERVER["REQUEST_URI"]);

$lastvars=end($patharr);

$afterWampToProjectRootPath=str_replace($lastvars,"",$_SERVER["REQUEST_URI"]);
if(!(isset($_REQUEST['t']) && trim($_REQUEST['t'])!=''))
{
    redirect("home.php");
}

$dnauserqry="select * from af_users where Allyfolio_User_ID=:afuserid and Profile_Status=0 ";
$condition[":afuserid"]=$_REQUEST['t'];
$dnauserinfo=$pdodbobj->fetch_array($pdodbobj->query($dnauserqry,$condition));

if(count($dnauserinfo)==0)
{
    redirect($_SERVER["HTTP_REFERER"]);
}


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<title>AllyFolio | DNA </title>

<link href="css/style.css" rel="stylesheet" type="text/css" media="all"  />

<link rel="stylesheet" href="alertify/themes/alertify.core.css" />
<link rel="stylesheet" href="alertify/themes/alertify.default.css" id="toggleCSS" />
<script src="alertify/lib/alertify.min.js"></script>	
<script src="js/jquery1.10.2.min.js"></script>
<script src="js/modernizr.custom.56223.js"></script>



<script src="js/jquery.placeholder.js"></script>

<style type="text/css">

	.logo{ margin-top:10px;}

	.log_button{

	

	height:auto;

	margin:6px 0;

	overflow:hidden;

	float:left;

	margin-top:10px;

	

	}

	.new tr td{ vertical-align:top}

	

	textarea select{ border:1px solid #ccc}

	input textarea select{ border:1px solid #999}

	

</style>

</head>



<body>



	<div id="main_wrapper">

    <!--=================Header Start=======================-->

	<div class="wrapper row1">
    
    <?php
    require_once("includes/dnaheader.php");
    
    ?>

    <div class="clearfix"></div>  

    </div>

    <div class="clearfix"></div>

    <!--=================Header end=======================-->

    <!--=================Body Contain Start=======================-->

    <div class="wrapper">

      <div class="header">

        <?php include_once("dna_top.php"); ?>
        <style>
        	.dna-profile-hidden{
				display: none;
			}
		</style>
		<?php
			$menuType="IMAGE";
			include_once("dna_photo_video_top.php"); 
		?>
		<div class="dna_form">
			<form id="dna_profile_form" name="dna_profile_form">
				<input type="hidden" name="dna_purpose" id="dna_purpose" value="" />
				
				<?php
					$condition=array();
					$qryMedia="select upmu.* from af_user_posts_activities as upa left join af_user_posts_media_uploads as upmu on upa.Post_ID=upmu.Post_ID where upmu.Media_Type='IMAGE' and upa.Status='Active' and upa.Post_Type_ID!=8 and User_ID=:User_ID order by upa.Posted_On_Date desc ";
					$condition[":User_ID"]=$dnauserinfo[0]["User_ID"];
					$arrMedia=$pdodbobj->fetch_array($pdodbobj->query($qryMedia,$condition));
					
					if(count($arrMedia)>0)
					{
						displayTabularStructure($arrMedia, "IMAGE");	
					}
					else
					{
						echo "There is no photos";
					}
					
				?>
									
			</form>
		</div>

<div class="clearfix"></div>

       </div>  

</div>

    </div>

    <div class="clearfix"></div>

    <!--=================Body Contain end=======================-->

    </div>
    
<?php
    require_once("includes/footer.php");
?>